package cn.tedu.charging.order.dao.repository;

import cn.tedu.charging.order.pojo.po.ChargingBillFailPO;
import cn.tedu.charging.order.pojo.po.ChargingBillSuccessPO;

import java.util.List;

public interface OrderRepository {
    Integer saveSuccessOrder(ChargingBillSuccessPO successPO);

    List<ChargingBillSuccessPO> orderList(Integer userId);

    Integer saveFailOrder(ChargingBillFailPO chargingBillFailPO);

    /**
     * 把正在充电中的订单改为异常结束
     * 快充 1个小时 充满,我们通过延迟消息处理应该1个小时充满,而没有充满的订单数据
     * @param orderNo
     * @return
     */
    //todo:commit的内容错了,上个版本是通过延迟消息处理超时未结束的订单
    Integer updateOrderStatusFromProcess2ExceptionEnd(String orderNo);


    ChargingBillSuccessPO getSuccess(String orderNo);

    ChargingBillFailPO getFail(String orderNo);

    void updateSuccessOrder(String orderNo, int gunId);

    void updateOrderStatusFromProcess2NormalEnd(String orderNo);
}
